package com.sky.mapper;


import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * The interface User mapper.
 */
@Mapper
public interface UserMapper {


    /**
     *  根据openId查询用户数
     *
     * @param openId the open id
     * @return the integer
     */
    @Select("select id, openid, name, phone, sex, id_number, avatar, create_time from user where openid = #{openId}")
    User selectCountByOpenId(String openId);


    void insert(User user);

    Integer countByMap(Map map);
}
